#! /bin/bash
case $1 in "start"){
for i in hadoop100.localdomain hadoop101.localdomain hadoop102.localdomain 
do 
echo " --------启动 $i zookeeper-------" 
ssh $i "source /etc/profile; Xzoo.sh start;echo --------启动 $i hbase-------; Xkafka.sh start; " 
done };; 
"stop"){
for i in hadoop100.localdomain hadoop101.localdomain hadoop102.localdomain 
do 
echo " --------停止 $i zookeeper-------" 
ssh $i "source /etc/profile; Xkafka.sh stop;echo --------停止 $i hbase-------; Xzoo.sh stop; " 
done };; 
esac
